import request from "../utils/request";

//登录
export function login(data) {
  return request({
    method: "post",
    url: "/api/PCApplet/AccounotLogin",
    data
  });
}

//用户管理列表
export function getUserList(params) {
  return request({
    method: "get",
    url: "/api/PCApplet/GetUserList_Admin",
    params
  });
}

//用获取身份列表
export function getUserRoleList(params) {
  return request({
    method: "get",
    url: "/api/PCApplet/GetRoleList_Admin",
    params
  });
}

//修改角色 用户信息
export function updateUserRole(params) {
  return request({
    method: "get",
    url: "/api/PCApplet/UpdateUser_Admin",
    params
  });
}

//上传图片到obs
export function uploadLargeForOBS(data) {
  return request({
    method: "post",
    url: "/api/PCApplet/UploadLargeFileOBS",
    data
  });
}

// 获取用户详情
export function getUserInfoById(id) {
  return request({
    method: "get",
    url: "/api/PCApplet/GetUserInfo_Admin?id=" + id
  });
}

//编辑用户详情
export function updateUserInfo(data) {
  return request({
    method: "put",
    url: "/api/PCApplet/UpdateUserInfo_Admin",
    data
  });
}

// 获取钉钉列表数据
export function getDingTalkList(name) {
  return request({
    method: "get",
    url: "/api/Label/DingTalkList?name=" + name
  });
}
